<%@ include file="../common/top.jsp" %>

<div id="Catalog"><%--<stripes:form
	beanclass="org.mybatis.jpetstore.web.actions.OrderActionBean">--%>
    <form action = "viewOrderForm">
        <table>
            <tr>
                <th colspan=2>Payment Details</th>
            </tr>
            <tr>
                <td>Card Type:</td>
                <td><%--<stripes:select name="order.cardType">
				<stripes:options-collection
					collection="${actionBean.creditCardTypes}" />
			</stripes:select>--%>
<%--                    <select name="order.cardType" id="">--%>
<%--                        <c:forEach items="${sessionScope.creditCardTypes}" var="creditCardType">--%>
<%--                            <option value="${creditCardType}">${creditCardType}</option>--%>
<%--                        </c:forEach>--%>
<%--                    </select>--%>

                    <select name="order.cardType" id="cardTypeSelect">
                        <%
                            // 获取会话作用域中的creditCardTypes集合
                            java.util.List<String> creditCardTypes = (java.util.List<String>) session.getAttribute("creditCardTypes");

                            // 检查集合是否为空
                            if (creditCardTypes != null && !creditCardTypes.isEmpty()) {
                                // 遍历集合生成选项
                                for (String creditCardType : creditCardTypes) {
                        %>
                        <option value="<%= creditCardType %>"><%= creditCardType %></option>
                        <%
                                }
                            }
                        %>
                    </select>

                </td>
            </tr>
            <tr>
                <td>Card Number:</td>
                <td><%--<stripes:text name="order.creditCard" />${sessionScope.order.creditCard}--%>
                    <input type="text" name="order.creditCard" value="${sessionScope.order.creditCard}">
                </td>
            </tr>
            <tr>
                <td>Expiry Date (MM/YYYY):</td>
                <td><%--<stripes:text name="order.expiryDate" />${sessionScope.order.expiryDate}--%>
                    <input type="text" name="order.expiryDate" value="${sessionScope.order.expiryDate}">
                </td>
            </tr>
            <tr>
                <th colspan=2>Billing Address</th>
            </tr>

            <tr>
                <td>First name:</td>
                <td><%--<stripes:text name="order.billToFirstName" />${sessionScope.order.billToFirstName}--%>
                    <input type="text" name="order.billToFirstName" value="${sessionScope.order.billToFirstName}">
                </td>
            </tr>
            <tr>
                <td>Last name:</td>
                <td><%--<stripes:text name="order.billToLastName" />${sessionScope.order.billToLastName}--%>
                    <input type="text" name="order.billToLastName" value="${sessionScope.order.billToLastName}">
                </td>
            </tr>
            <tr>
                <td>Address 1:</td>
                <td><%--<stripes:text size="40" name="order.billAddress1" />${sessionScope.order.billAddress1}--%>
                    <input type="text" name="order.billAddress1" value="${sessionScope.order.billAddress1}">
                </td>
            </tr>
            <tr>
                <td>Address 2:</td>
                <td><%--<stripes:text size="40" name="order.billAddress2" />${sessionScope.order.billAddress2}--%>
                    <input type="text" name="order.billAddress2" value="${sessionScope.order.billAddress2}">
                </td>
            </tr>
            <tr>
                <td>City:</td>
                <td><%--<stripes:text name="order.billCity" />${sessionScope.order.billCity}--%>
                    <input type="text" name="order.billCity" value="${sessionScope.order.billCity}">
                </td>
            </tr>
            <tr>
                <td>State:</td>
                <td><%--<stripes:text size="4" name="order.billState" />${sessionScope.order.billState}--%>
                    <input type="text" name="order.billState" value="${sessionScope.order.billState}">
                </td>
            </tr>
            <tr>
                <td>Zip:</td>
                <td><%--<stripes:text size="10" name="order.billZip" />${sessionScope.order.billZip}--%>
                    <input type="text" name="order.billZip" value="${sessionScope.order.billZip}">
                </td>
            </tr>
            <tr>
                <td>Country:</td>
                <td><%--<stripes:text size="15" name="order.billCountry" />${sessionScope.order.billCountry}--%>
                    <input type="text" name="order.billCountry" value="${sessionScope.order.billCountry}">
                </td>
            </tr>

            <tr>
                <td colspan=2>
                    <input type="checkbox" name="shippingAddressRequired">
                    Ship to different address...
                </td>
            </tr>

        </table>

        <%--<stripes:submit name="newOrder" value="Continue" />--%>
        <input type="submit" name="newOrder" value="Confirm">
        <%--</stripes:form>--%>
    </form>
</div>
<%@ include file="../common/bottom.jsp" %>
